package com.nunbey.lingxi.deep_predict;

import java.util.ArrayList;

/**
 * @description 调用python脚本对心跳数据进行判别
 */
public class HeartPredict implements IHeartPredict {


    @Override
    public String heartPredict(ArrayList<Integer> rates) {
        String command = "python predict.py";
        BufferedReader br = new BufferedReader(
                    new InputStreamReader(
                            runtime.exec("ipconfig").getInputStream(),
                            utf-8
                    )
            );
            String line = br.readLine();
           Map map = JSONObject.parseObject(line , Map.class);
           Map.Entry entry= (Map.Entry) iterator.next();
           String result = entry.getValue();
        return result ;
    }

    @Override
    public String heartPredict(String filePath) {
        return null;
    }
}
